
import {request } from "./request"

//电台 - 分类
export function dj_catelist(){
     return request({
         url:'/dj/catelist',
         withCredentials: true
     })
}

//电台 - 分类推荐
export function dj_type(type){
    return request({
        url:'/dj/recommend/type',
        withCredentials: true,
        params:{
            type
        }
    })
}

//电台 - 类别热门电台
export function radio_hot(limit,offset,cateId){
    return request({
        url:'/dj/radio/hot',
        withCredentials: true,
        params:{
            limit,
            offset,
            cateId,
            timerstamp:Date.now()
        }
    })
}

export function dj_detail(rid){  //电台详情
    return request({
        url:"/dj/detail",
        withCredentials: true,
        params:{
            rid,
            timerstamp:Date.now(),
        }
    })
}
export function DJ(){
    return request({     //电台的订阅列表
      url:"/dj/sublist",
      withCredentials: true,
      params:{
        timerstamp:Date.now()
      }
    })
}

export function sub(rid,t){ //电台 - 订阅
    return request({
        url:"/dj/sub",
        withCredentials: true, 
        params:{
            rid,
            t,
            timerstamp:Date.now(),
        }
    })
}

//推荐节目
export function recommend_dj(){
      return request({
          url:'/program/recommend',
          withCredentials: true, 
      })
}
//电台 - 节目榜
export function toplist_dj(limit,offset){
    return request({
        url:'/dj/program/toplist',
        withCredentials: true,
        params:{
            limit,
            offset
        }
    })
}
//电台 - 节目详情
export function dj_program_detail(id){
    return request({
        url:"/dj/program/detail",
        withCredentials: true,
        params:{
            id
        }
    })
}